<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
$_SESSION["sessdata"]["pagefrom"]=$_SERVER["QUERY_STRING"];

?>


<div class="orgbar"><span class="text"><b>ReportGroup Options:</b></span></div>
<table border="0" cellpaddingg="0" cellspacing="0">

<?
$serverGroupInfo["serverGroupID"] = $serverGroupInfo["ID"];
$BigDaddyDisplay->ShowReportGroupLine($serverGroupInfo)
?>

</table>

<?

$aServerGroupModules = $BigDaddyData->GetModulesByReportGroupID($_REQUEST["serverGroupID"]);

?>

<p class="categoryheader"><?=$pageParams["title"];?>: Monitoring Modules</p>


<div class="orgbar"><span class="text"><b><?=$serverGroupInfo["groupname"];?> Reporting On Modules:</b></span></div>
<table border="0" cellpadding="0" cellspacing="0" width="97%">
<?

function GetRemoveButton($nServerModuleID, $nServerGroupID)
{
	if ($GLOBALS["BigDaddy"]->IsUserAllowedByAction("server-edit"))
	{
		return "<a href=\"/reportgroup/query_reportgroup.php?action=deletemodfromgroup&serverModuleID=".$nServerModuleID."&serverGroupID=".$nServerGroupID."\" onclick=\"javascript: return confirm('Remove this module from group?')\">remove from group</a>";
	}
	else
	{
		return '<span class="dead">remove from group</span>';
	}
	
}


if (!is_array($aServerGroupModules))
{
?>
	<tr valign="middle" align="center">
	<td width="100%" class="lineitem">
		No Server Modules Added To This Report Group
	</td>
	</tr>

<?
}
else
{
	foreach ($aServerGroupModules as $nIndex => $row)
	{
		$sExtraButton = GetRemoveButton($row["serverModuleID"],$_REQUEST["serverGroupID"]);
		$BigDaddyDisplay->ShowServerModuleLine($row, $row["serverID"], $sExtraButton);
	}
}
?>
</table>


<?
if ($serverGroupInfo["notes"] != "")
{
	?>
	<p class="categoryheader"><?=$pageParams["title"];?>: Notes</p>

	<p><?=nl2br($serverGroupInfo["notes"]);?></p>
	<?
}
?>
